/*
* $Id: AddHousingDialog.h 160 2010-10-02 19:34:38Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Alexey Volokitin
* All rights reserved
*
*/
#ifndef _ADD_HOUSING_DIALOG_H_
#define _ADD_HOUSING_DIALOG_H_

class CAddHousingDialog : public CDialog
{
public:
	struct housing{
		int m_nId;
		std::tstring m_strName;
	};
private:
	CWnd* m_pParent;
	CTabCtrl m_variantTab;
	CStatic m_nameStatic;
	CEdit m_name;
	CStatic m_typeHStatic;
	CComboBox m_typeHousing;
	CStatic m_typeFStatic;
	CComboBox m_typeFrame;
	CListBox m_listHousing;
	CButton m_Ok;
	int m_oldSel;
	CFont* m_pFont;
private:
	housing m_housing;
private:
	void SelChanged();
	void SetNew();
	void SetChoose();
	void SetName();
	bool IsEnableOk();
public:
	CAddHousingDialog(CWnd* pParent);
	virtual ~CAddHousingDialog();
protected:
	DECLARE_MESSAGE_MAP();
	virtual void DoDataExchange(CDataExchange* pDX);
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	afx_msg void OnTabSelChange(NMHDR* nmhdr, LRESULT* pResult);
	afx_msg void OnName();
public:
	void GetHousing(int& nId, std::tstring& strName);
};

#endif/*_ADD_HOUSING_DIALOG_H_*/